package com.ltxtiyu.video.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 页面跳转控制器
 */
@RequestMapping("page")
@Controller
public class PageController {

//    @RequestMapping("{name}")
//    public String topage(@PathVariable("name") String name){
//        return name;
//    }
    /**
     * 主页
     * @return
     */
    @RequestMapping("home")
    public String tohome(){
        return "home";
    }

    /**
     * 首页
     * @return
     */
    @RequestMapping("welcome")
    public String toWelcome(){
        return "index";
    }


    /**
     * 话题页
     * @return
     */
    @RequestMapping("topic")
    public String toTopic(){
        return "topic/topic_list";
    }

    /**
     * 同城
     * @return
     */
    @RequestMapping("cityWide")
    public String tocityWide(){
        return "cityWide/cityWide_list";
    }

    /**
     * 热搜干预
     * @return
     */
    @RequestMapping("hotSearch")
    public String tohotSearch(){
        return "hotSearch/hotSearch_list";
    }

    /**
     * 搜索
     * @return
     */
    @RequestMapping("search")
    public String toSearch(){
        return "hotSearch/search_list";
    }

    /**
     * 视频
     * @return
     */
    @RequestMapping("video")
    public String tovideo(){
        return "video/video_list";
    }

    /**
     * 用户
     * @return
     */
    @RequestMapping("user")
    public String touser(){
        return "user/user_list";
    }

    /**
     * 管理员
     * @return
     */
    @RequestMapping("manager")
    public String tomanager(){
        return "system/manager_list";
    }

    /**
     *  登陆
     * @return
     */
    @RequestMapping("login")
    public String toLogin (){
        return "login";
    }

    /**
     * 管理员修改密码
     * @return
     */
    @RequestMapping("adminChangePwd")
    public String toUpdatePass(){
        return "system/admin_changePwd";
    }

    /**
     * 音乐列表
     * @return
     */
    @RequestMapping("music")
    public String toMusic(){
        return "music/music_list";
    }
}
